package vip.web3.api.service.base;

import org.redisson.api.RBloomFilter;
import org.redisson.api.RLock;

import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * @Date 2022/6/6 16:34
 * @Version 1.0
 */
public interface RedissonClientApiService {

    boolean trySet(String key, int value, int time, TimeUnit timeUnit);

    boolean trySet(String key, Object value);
    
    void setValue(String key, Object value, Long time, TimeUnit timeUnit);
    
    void setValue(String key, Object value);

    boolean hasKey(String key);

    boolean deleteKey(String key);

    Long incr(String key);

    Long getRAtomicLong(String key);

    Long incrAddAndGet(String key,long value);

    Integer getInt(String key);

    String getString(String key);

    boolean getBucketLock(String key, Long id);

    void releaseBucketLock(String key, Long id);
    
    boolean setExpire(String key, Long time, TimeUnit timeUnit);

    boolean setExpireDate(String key, Date date);

    RBloomFilter<String> getBloomFilter(String str);
    
    RLock getLock(String s);

}
